package com.azure.mapper.report;

import com.azure.entity.AUserMapReport;
import com.azure.entity.AUserMapReportExample;
import java.util.List;

import net.minidev.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AUserMapReportMapper {
    int countByExample(AUserMapReportExample example);

    int deleteByExample(AUserMapReportExample example);

    int deleteByPrimaryKey(Long id);

    int insert(AUserMapReport record);

    int insertSelective(AUserMapReport record);

    List<AUserMapReport> selectByExample(AUserMapReportExample example);

    AUserMapReport selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") AUserMapReport record, @Param("example") AUserMapReportExample example);

    int updateByExample(@Param("record") AUserMapReport record, @Param("example") AUserMapReportExample example);

    int updateByPrimaryKeySelective(AUserMapReport record);

    int updateByPrimaryKey(AUserMapReport record);

    @Select("select * from a_user_map_report where date >= ${date} order by province,city" )
    List<AUserMapReport> selectByDate(@Param("date") String date);

    @Select("select date,province,sum(count) count from a_user_map_report where date = ${date} group by date,province" )
    List<JSONObject> getDailyReportData(@Param("date") String date);
}